{case value="select2"}
    {php}
        $load_select2=1;
    {/php}
    <div class="form-group item_{$field.name} {$field.extra_class|default=''}">
       <label for="{$field.name}" class="col-md-2 control-label">{present name="field.confirm"}{eq name="field.confirm" value="required"}<sup>*</sup>{/eq}{/present}{$field.title}</label>
       <div class="col-md-4">
            <select name="{$field.name}" id="{$field.name}" class="select2-container form-control" {$field.extra_attr|default=''}>
                {present name="field.options.none"}{notempty name="field.options.none"}<option value=''>{$field.options.none}</option>{/notempty}{php}unset($field['options']['none']);{/php}{else/}<option value=''>请选择</option>{/present}
                {foreach name="field.options" item="option" key="option_key"}
                    {php}if(is_array($option)):{/php}
                        <option value="{$option_key}" {present name="field.value"}{eq name="field.value" value="$option_key"} selected{/eq}{/present}
                            {foreach name="option" item="option2" key="option_key2"}
                                {$option_key2}="{$option2}"
                            {/foreach}>
                            {$option.title}
                        </option>
                    {php}else:{/php}
                        <option value="{$option_key}" {present name="field.value"}{eq name="field.value" value="$option_key"} selected{/eq}{/present}>{$option}</option>
                    {php}endif;{/php}
                {/foreach}
            </select>
        </div>
        {notempty name="field.description"}<div class="col-md-6 help-block"><i class="fa fa-info-circle color-info1"></i> {$field.description}</div>{/notempty}

        <script type="text/javascript">
        $(document).ready(function() {
            if ($.support.pjax) {
                $(document).on('ready pjax:end', function(event) {   
                    $("#{$field.name}").select2();
                })
            } else{
                $("#{$field.name}").select2();
            }          
        });
        </script>
    </div>
{/case}